﻿using Coldairarrow.Entity.Base_Manage;
using Coldairarrow.Entity.DTO;
using Coldairarrow.Entity.PB;
using Coldairarrow.Util;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace Coldairarrow.Business.PB
{
    public partial interface IPB_ScheduleDetailBusiness
    {
        /// <summary>
        /// 生产排班
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<PageResult<PB_ScheduleDetail>> GetDataListAsync(PageInput<ConditionDTO> input);
       /// <summary>
       /// 通过id查找单个生产排班信息
       /// </summary>
       /// <param name="id"></param>
       /// <returns></returns>
        Task<PB_ScheduleDetail> GetTheDataAsync(string id);
       /// <summary>
       /// 添加生产排班 model
       /// </summary>
       /// <param name="data"></param>
       /// <returns></returns>
        Task AddDataAsync(PB_ScheduleDetail data);
        /// <summary>
        /// 修改生产排班model
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        Task UpdateDataAsync(PB_ScheduleDetail data, string USERIDS);
        /// <summary>
        /// 删除生产排班详情
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        Task DeleteDataAsync(List<string> ids);
        /// <summary>
        /// 批量修改生产排班 类别白班
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        Task TestSqlDataAsync(string ids);
        /// <summary>
        /// 批量修改生产排班 类别夜班
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        Task BatchNightShift(string ids);
        /// <summary>
        /// 联合插叙
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<PageResult<PB_ScheduleDetailListDTO>> GetDataListShowAllNameAsync(PB_ProductionOrderDetailInput input);
        Task<List<PB_ScheduleDetailDTO>> GetDataList();
        Task<List<PB_ScheduleDetailUserDTO>> GetDataListid(string parid);
        Task<PageResult<PB_ScheduleDetailUserDTO>> GetDataListByAreaids(PageInput<ConditionDTO> input,string ID);
        Task<List<PB_ScheduleDetailUserDTO>> GetDataListids(string ids);
        Task<PageResult<PB_ScheduleDetailDTO>> GetDataListAsyncDtoList(PageInput<PB_ScheduleDetailConditionDTO> input);
        Task<PageResult<PB_ScheduleDetailDTO>> GetDataListAsyncDtoListParids(PageInput<PB_ScheduleDetailConditionDTO> input,String parids);
        /// <summary>
        /// 根据创建时间进行查询
        /// </summary>
        /// <param name="CreateTime"></param>
        /// <param name="oldTime"></param>
        /// <returns></returns>
        Task<List<PB_ScheduleDetailDTO>> GetDataTimeList( DateTime? CreateTime ,DateTime? oldTime);
        /// <summary>
        /// 批量修改 排班详情信息 将 班别改为夜班
        /// </summary>
        /// <param name="data"></param>
        /// <param name="_redisOptions"></param>
        /// <returns></returns>
        Task BatchtonightShift(PB_ScheduleDetail data);
        /// <summary>
        /// 根据组织id进行查询人员信息
        /// </summary>
        /// <param name="Deptid"></param>
        /// <returns></returns>
        Task <List<PB_ScheduleDetailDTO>> GetDataDeptList(String Deptid);
        /// <summary>
        /// 查询所有白班的用户
        /// </summary>
        /// <returns></returns>
        Task<List<PB_ScheduleDetailDTO>> GetDataByDayshift();
        /// <summary>
        /// 查询所有夜班的用户
        /// </summary>
        /// <returns></returns>
        Task<List<PB_ScheduleDetailDTO>> GetDataByNightshift();
        /// <summary>
        /// 大屏显示当日出勤报工人数
        /// </summary>
        /// <param name="Day">前第几天</param>
        /// <returns>当日出勤报工人数</returns>
        ScreenDisplayValue3DTO GetTodayScheduleAttendNums(int Day);
        /// <summary>
        /// 大屏显示七日出勤人数
        /// </summary>
        /// <param name="Day">前第几天</param>
        /// <returns>七日出勤人数</returns>
        ScreenDisplayBarChartDTO Get7DaysScheduleAttendNums(int Day);
        /// <summary>
        /// 大屏显示当日出勤率
        /// </summary>
        /// <param name="Day"></param>
        /// <returns></returns>
        ScreenDisplayDashboardDTO GetScheduleAttendRate(int Day);
    }
}